SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by willysr
so that means all users wanting to use slackpkg should install emacs?
i don't think most users will agree on this one
i personally don't install emacs and i think sdiff works for me
That's not at all what I wrote...
I asked to be able to choose which merge tool you want to use. With an environment variable. I mentioned emacs just because it's the one I want to use in my particular situation...
... Is it a joke ? Do I tell you how you need to work ?
willysr indeed has a point there. Having multiple options for that means that someone has to implement and test that every time changes are made to slackpkg, with all possible options. If there isn't an obvious advantage of using Emacs or anything else to do the job I don't see why the developer should add this.
But I am really curious about that, what exactly do you want to achieve with the switch to Emacs?
no, it's not a joke
i know emacs is a great application and some might like it and prefer it compared to vi or nano, but i don't see anything different with the results of diff by changing to emacs (please, CMIIW)
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by TobiSGD
willysr indeed has a point there. Having multiple options for that means that someone has to implement and test that every time changes are made to slackpkg, with all possible options. If there isn't an obvious advantage of using Emacs or anything else to do the job I don't see why the developer should add this.
But I am really curious about that, what exactly do you want to achieve with the switch to Emacs?
Alright, that's a better approach to the question. At least I cant understand your point about maintainability.
It's before all a matter of being more productive to be able to use the tool you're used to use in your daily tasks. That's seems obvious to me.
Beside I don't ask for emacs (I thought my OP was clear about that)...
I ask to be able to have an environment variable to be able to customize.
That's it. I might be wrong but those modifying (customizing) this variable should be aware enough to understand how it works and being responsible to maintain their own customization.
I use emacs, but many others use vim so I'm not doing some "emacs evangelization" and don't want to enter in this mode...
I was just talking about giving slackpkg some more flexibility.
And I'm open to any point which could be about "not in the plan" or "difficult to maintain" although I really don't see (I might be wrong) any difficult problem here.
In practice it could even be a wrapper script that shuffle arguments if the wanted merge tool is too exotic.
Thanks
Garry.
Last edited by NoStressHQ; 09-24-2013 at 10:52 AM.
Reason: fixed typos
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by willysr
no, it's not a joke
i know emacs is a great application and some might like it and prefer it compared to vi or nano, but i don't see anything different with the results of diff by changing to emacs (please, CMIIW)
Ok sorry I took it badly, it's just it was not at all the point of my post.
And I don't see the need to argue "which one is better" because ultimately, it's a matter of choice, is it personal or professional/corporate... Anyway.
I'm not saying sdiff is rubbish, sdiff is good when you don't have anything else accessible.
I'd just rather use emacs for that, it's a choice as any choice.
Edit: obviously, I hope there's no difference in the 'result of diff' haha... It's on the way you do the merge, which color you want etc. Usability in short, productivity for a longer word.
Edit2: also it's less error prone to use something you're used to use... And config files merges can sometimes be "sensible".
Edit3: sorry, I can understand the problem now, I'm talking about having 'interactive merge tool'. And now I see that it might introduce more changes in slackpkg behavior. But I guess it's not something impossible. So that was maybe the source of misunderstanding. But sdiff is interactive too so at the end, it seems to me that the point is the same.
Last edited by NoStressHQ; 09-24-2013 at 11:28 AM.
Slackpkg is designed to be easy to customise. I actually implement a custom merge using vimdiff. I find it useful for updating large config files with custom entries e.g. for cups and ssh. Adapting this for emacs should not be difficult.
I edit /usr/libexec/slackpkg/functions.d/postfunctions.sh
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by allend
Slackpkg is designed to be easy to customise. I actually implement a custom merge using vimdiff. I find it useful for updating large config files with custom entries e.g. for cups and ssh. Adapting this for emacs should not be difficult.
I edit /usr/libexec/slackpkg/functions.d/postfunctions.sh
Yes, that's what I meant !
I know this file, it's just I'd rather not modify/patch it, and I myself don't want to use emacs all the time. That's why I was talking about an environment variable... In the function mergenew(),
I find that having another menu entry is more convenient than setting an environment variable.
Editing postfunctions.sh is only a problem when it gets overwritten by a package update.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by allend
I find that having another menu entry is more convenient than setting an environment variable.
Editing postfunctions.sh is only a problem when it gets overwritten by a package update.
Well here are my points:
- consistency: it's like the common $EDITOR env var used in many places.
- complexity: a menu requires more modification and imply to know which options you want to provide, and each must be tested upstream (this might become a PITA for developers)
- flexibility: a variable can be set to anything the user want, even a yet unknown tool or a wrapper script that provide an "unified" interface.
Plus you can set the variable in a script (or the .bashrc file) and it's not difficult.
On my point of view the variable is more "UNIX" in style and flavor, it's a very tiny modification and open to more choice.
BTW, it's my developer reflex and my preference, I don't know what slackpkg developers prefer, it's up to them.
One argument for avoiding using emacs is that it requires X to be running. I prefer to do my upgrades from run level 3, so vimdiff is a viable choice for that.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Original Poster
Rep:
Quote:
Originally Posted by allend
One argument for avoiding using emacs is that it requires X to be running. I prefer to do my upgrades from run level 3, so vimdiff is a viable choice for that.
Have you noticed "emacs-24.2-no-x11" ? As a matter of fact I got an alias as "emacs-console" for my headless server...
(Edit: And even in graphical environment I tend to use the console version of emacs...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.